package com.xc.tjise.TJISE.day08;

import java.io.*;

public class Test {
    public static void main(String[] args) {//抽象类不能实例化
        try {
            InputStream inputStream = new FileInputStream("D:/qwe.txt");
         //   System.out.println(inputStream.read());


/*            System.out.println(inputStream.available());
//            System.out.println(inputStream.read());
              byte[] bytes =new byte[4];
            System.out.println(inputStream.read(bytes));
            for (byte aByte : bytes) {
                System.out.println((char)aByte);
            }*/



    byte[] bytes1 =new byte[4];
           int offset =0 , length=4;
           inputStream.read(bytes1,offset,length);
//            System.out.println((char)bytes1[2]);



            //从文件qwe.txt 中读取内容写入另一个文档
            OutputStream outputStream = new FileOutputStream("D:/demo.txt");

            for (byte aByte : bytes1){
            outputStream.write(aByte);}
//            outputStream.close();
//            Reader reader = new FileReader("D:/qwe.txt");
//            Writer writer = new FileWriter("D:/demo.txt");
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}


/*

    abstract class Fa{
     public  abstract void m();
    }
    abstract class So extends Fa{


     */
/*   @Override
        public void m() {

        }
      *//*

    }*/
